home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr13 / aurora2c.zip / KEYDEF.AML < prev    next >
Text File  |  1995-04-07  |  5KB  |  247 lines

  1.  
  2. // ───────────────────────────────────────────────────────────────────
  3. // The Aurora Editor v2.0
  4. // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
  5. //
  6. // Show assigned and unassigned keys
  7. //
  8. // This macro displays a popup menu showing assigned and unassigned keys
  9. // for the current window type (edit windows or file manager windows).
  10. // If the current window is an edit window, selecting a key from the
  11. // popup menu will enter it into the text at the cursor.
  12. // ───────────────────────────────────────────────────────────────────
  13.  
  14.   // compile time macros and function definitions
  15.   include bootpath "define.aml"
  16.  
  17.   // create a data buffer with all the keynames
  18.   databuf "keynames"
  19.     "<alt '>"
  20.     "<alt ,>"
  21.     "<alt ->"
  22.     "<alt .>"
  23.     "<alt />"
  24.     "<alt 0>"
  25.     "<alt 1>"
  26.     "<alt 2>"
  27.     "<alt 3>"
  28.     "<alt 4>"
  29.     "<alt 5>"
  30.     "<alt 6>"
  31.     "<alt 7>"
  32.     "<alt 8>"
  33.     "<alt 9>"
  34.     "<alt ;>"
  35.     "<alt =>"
  36.     "<alt a>"
  37.     "<alt b>"
  38.     "<alt backspace>"
  39.     "<alt c>"
  40.     "<alt d>"
  41.     "<alt del>"
  42.     "<alt down>"
  43.     "<alt e>"
  44.     "<alt end>"
  45.     "<alt enter>"
  46.     "<alt esc>"
  47.     "<alt f10>"
  48.     "<alt f11>"
  49.     "<alt f12>"
  50.     "<alt f1>"
  51.     "<alt f2>"
  52.     "<alt f3>"
  53.     "<alt f4>"
  54.     "<alt f5>"
  55.     "<alt f6>"
  56.     "<alt f7>"
  57.     "<alt f8>"
  58.     "<alt f9>"
  59.     "<alt f>"
  60.     "<alt g>"
  61.     "<alt grey*>"
  62.     "<alt grey+>"
  63.     "<alt grey->"
  64.     "<alt grey/>"
  65.     "<alt greyenter>"
  66.     "<alt h>"
  67.     "<alt home>"
  68.     "<alt i>"
  69.     "<alt ins>"
  70.     "<alt j>"
  71.     "<alt k>"
  72.     "<alt l>"
  73.     "<alt left>"
  74.     "<alt m>"
  75.     "<alt n>"
  76.     "<alt o>"
  77.     "<alt p>"
  78.     "<alt pgdn>"
  79.     "<alt pgup>"
  80.     "<alt q>"
  81.     "<alt r>"
  82.     "<alt right>"
  83.     "<alt s>"
  84.     "<alt t>"
  85.     "<alt tab>"
  86.     "<alt u>"
  87.     "<alt up>"
  88.     "<alt v>"
  89.     "<alt w>"
  90.     "<alt x>"
  91.     "<alt y>"
  92.     "<alt z>"
  93.     "<alt [>"
  94.     "<alt \\>"
  95.     "<alt ]>"
  96.     "<alt `>"
  97.     "<backspace>"
  98.     "<center>"
  99.     "<char>"
  100.     "<ctrl ->"
  101.     "<ctrl 2>"
  102.     "<ctrl 6>"
  103.     "<ctrl a>"
  104.     "<ctrl b>"
  105.     "<ctrl backspace>"
  106.     "<ctrl c>"
  107.     "<ctrl center>"
  108.     "<ctrl d>"
  109.     "<ctrl del>"
  110.     "<ctrl down>"
  111.     "<ctrl e>"
  112.     "<ctrl end>"
  113.     "<ctrl enter>"
  114.     "<ctrl f10>"
  115.     "<ctrl f11>"
  116.     "<ctrl f12>"
  117.     "<ctrl f1>"
  118.     "<ctrl f2>"
  119.     "<ctrl f3>"
  120.     "<ctrl f4>"
  121.     "<ctrl f5>"
  122.     "<ctrl f6>"
  123.     "<ctrl f7>"
  124.     "<ctrl f8>"
  125.     "<ctrl f9>"
  126.     "<ctrl f>"
  127.     "<ctrl g>"
  128.     "<ctrl grey*>"
  129.     "<ctrl grey+>"
  130.     "<ctrl grey->"
  131.     "<ctrl grey/>"
  132.     "<ctrl greyenter>"
  133.     "<ctrl h>"
  134.     "<ctrl home>"
  135.     "<ctrl i>"
  136.     "<ctrl ins>"
  137.     "<ctrl j>"
  138.     "<ctrl k>"
  139.     "<ctrl l>"
  140.     "<ctrl left>"
  141.     "<ctrl m>"
  142.     "<ctrl n>"
  143.     "<ctrl o>"
  144.     "<ctrl p>"
  145.     "<ctrl pgdn>"
  146.     "<ctrl pgup>"
  147.     "<ctrl prtsc>"
  148.     "<ctrl q>"
  149.     "<ctrl r>"
  150.     "<ctrl right>"
  151.     "<ctrl s>"
  152.     "<ctrl t>"
  153.     "<ctrl tab>"
  154.     "<ctrl u>"
  155.     "<ctrl up>"
  156.     "<ctrl v>"
  157.     "<ctrl w>"
  158.     "<ctrl x>"
  159.     "<ctrl y>"
  160.     "<ctrl z>"
  161.     "<ctrl [>"
  162.     "<ctrl \\>"
  163.     "<ctrl ]>"
  164.     "<del>"
  165.     "<down>"
  166.     "<end>"
  167.     "<enter>"
  168.     "<esc>"
  169.     "<f10>"
  170.     "<f11>"
  171.     "<f12>"
  172.     "<f1>"
  173.     "<f2>"
  174.     "<f3>"
  175.     "<f4>"
  176.     "<f5>"
  177.     "<f6>"
  178.     "<f7>"
  179.     "<f8>"
  180.     "<f9>"
  181.     "<grey*>"
  182.     "<grey+>"
  183.     "<grey->"
  184.     "<greyenter>"
  185.     "<home>"
  186.     "<ins>"
  187.     "<left>"
  188.     "<otherkey>"
  189.     "<pgdn>"
  190.     "<pgup>"
  191.     "<right>"
  192.     "<shift center>"
  193.     "<shift del>"
  194.     "<shift down>"
  195.     "<shift end>"
  196.     "<shift f10>"
  197.     "<shift f11>"
  198.     "<shift f12>"
  199.     "<shift f1>"
  200.     "<shift f2>"
  201.     "<shift f3>"
  202.     "<shift f4>"
  203.     "<shift f5>"
  204.     "<shift f6>"
  205.     "<shift f7>"
  206.     "<shift f8>"
  207.     "<shift f9>"
  208.     "<shift home>"
  209.     "<shift ins>"
  210.     "<shift left>"
  211.     "<shift pgdn>"
  212.     "<shift pgup>"
  213.     "<shift right>"
  214.     "<shift tab>"
  215.     "<shift up>"
  216.     "<shiftkey>"
  217.     "<tab>"
  218.     "<up>"
  219.   end
  220.  
  221.   // get the window event object
  222.   window_object = getwinobj
  223.  
  224.   // do for all lines in the data buffer
  225.   repeat
  226.     // check for the key function in the current event object hierarchy
  227.     if function? (gettext) window_object then
  228.       ovltext "Assigned" 19
  229.     end
  230.   until not down
  231.  
  232.   // display the buffer in a popup menu and get the key selected
  233.   keystr = popup (getcurrbuf) window_object + " window keys" 26
  234.  
  235.   // destroy the key data buffer
  236.   destroybuf
  237.  
  238.   // if a key string was selected, enter it at the cursor
  239.   if keystr then
  240.     // remove the 'Assigned' label, if present
  241.     if keystr [0] <> '>' then
  242.       keystr = keystr [1 : pos '>' keystr 'r']
  243.     end
  244.     send "write" keystr
  245.   end
  246.  
  247.